package com.tanhua.model.testpaper;


import com.tanhua.model.domain.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class SoulReport implements Serializable {

    private Long id; //报告id
    private String nickname;
    private Long userId; // 用户id
    private Long paperId; // 试卷id
    private String cover; // 鉴定图片
    private Long appraiseId; //人格类型id
    private String title; // 人格类型
    private String content; // 人格介绍
    private String dimensions; //人格
    private Double score;//评分

    private String created; // 更新时间

    public  SoulReport(SoulAppraise appraise, UserInfo userinfo, Double score) {
        this.nickname = userinfo.getNickname();
        this.userId = userinfo.getId();
        this.cover = appraise.getCover();
        this.title = appraise.getTitle();
        this.content = appraise.getContent();
        this.dimensions = appraise.getDimensions();
        this.appraiseId = appraise.getId();
        this.score = score;
        this.created = (new Date()).toString();
    }
}
